<template>
  <div>
    <p>
      <router-link to="/">{{ num }}秒后回到首页</router-link>
    </p>
    <img src="../assets/404.jpg" alt="" />
  </div>
</template>

<script>
export default {
  name: 'Notfound',

  data () {
    return {
      num: 3
    }
  },
  created () {
    let timeID = setInterval(() => {
      if (this.num == 0) {
        this.$router.push('/find')
        clearInterval(timeID)
        return
      }
      this.num--
    }, 1000)
  }
}
</script>

<style lang="scss" scoped></style>
